Optimal. Leaf size=49 \[ -\frac {2 d \log \left (\cosh \left (\frac {e}{2}+\frac {f x}{2}\right )\right )}{a f^2}+\frac {(c+d x) \tanh \left (\frac {e}{2}+\frac {f x}{2}\right )}{a f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3399, 4269,
3556} \begin {gather*} \frac {(c+d x) \tanh \left (\frac {e}{2}+\frac {f x}{2}\right )}{a f}-\frac {2 d \log \left (\cosh \left (\frac {e}{2}+\frac {f x}{2}\right )\right )}{a f^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3399
Rule 3556
Rule 4269
Rubi steps
\begin {align*} \int \frac {c+d x}{a+a \cosh (e+f x)} \, dx &=\frac {\int (c+d x) \csc ^2\left (\frac {1}{2} (i e+\pi )+\frac {i f x}{2}\right ) \, dx}{2 a}\\ &=\frac {(c+d x) \tanh \left (\frac {e}{2}+\frac {f x}{2}\right )}{a f}-\frac {d \int \tanh \left (\frac {e}{2}+\frac {f x}{2}\right ) \, dx}{a f}\\ &=-\frac {2 d \log \left (\cosh \left (\frac {e}{2}+\frac {f x}{2}\right )\right )}{a f^2}+\frac {(c+d x) \tanh \left (\frac {e}{2}+\frac {f x}{2}\right )}{a f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.16, size = 70, normalized size = 1.43 \begin {gather*} \frac {2 \cosh \left (\frac {1}{2} (e+f x)\right ) \left (-2 d \cosh \left (\frac {1}{2} (e+f x)\right ) \log \left (\cosh \left (\frac {1}{2} (e+f x)\right )\right )+f (c+d x) \sinh \left (\frac {1}{2} (e+f x)\right )\right )}{a f^2 (1+\cosh (e+f x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.23, size = 63, normalized size = 1.29
method | result | size |
risch | \(\frac {2 d x}{a f}+\frac {2 d e}{a \,f^{2}}-\frac {2 \left (d x +c \right )}{a f \left ({\mathrm e}^{f x +e}+1\right )}-\frac {2 d \ln \left ({\mathrm e}^{f x +e}+1\right )}{a \,f^{2}}\) | \(63\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 76, normalized size = 1.55 \begin {gather*} 2 \, d {\left (\frac {x e^{\left (f x + e\right )}}{a f e^{\left (f x + e\right )} + a f} - \frac {\log \left ({\left (e^{\left (f x + e\right )} + 1\right )} e^{\left (-e\right )}\right )}{a f^{2}}\right )} + \frac {2 \, c}{{\left (a e^{\left (-f x - e\right )} + a\right )} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 116 vs.
\(2 (43) = 86\).
time = 0.41, size = 116, normalized size = 2.37 \begin {gather*} \frac {2 \, {\left (d f x \cosh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) + d f x \sinh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) - c f - {\left (d \cosh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) + d \sinh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) + d\right )} \log \left (\cosh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) + \sinh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) + 1\right )\right )}}{a f^{2} \cosh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) + a f^{2} \sinh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) + a f^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 76 vs.
\(2 (37) = 74\).
time = 0.33, size = 76, normalized size = 1.55 \begin {gather*} \begin {cases} \frac {c \tanh {\left (\frac {e}{2} + \frac {f x}{2} \right )}}{a f} + \frac {d x \tanh {\left (\frac {e}{2} + \frac {f x}{2} \right )}}{a f} - \frac {d x}{a f} + \frac {2 d \log {\left (\tanh {\left (\frac {e}{2} + \frac {f x}{2} \right )} + 1 \right )}}{a f^{2}} & \text {for}\: f \neq 0 \\\frac {c x + \frac {d x^{2}}{2}}{a \cosh {\left (e \right )} + a} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 66, normalized size = 1.35 \begin {gather*} \frac {2 \, {\left (d f x e^{\left (f x + e\right )} - d e^{\left (f x + e\right )} \log \left (e^{\left (f x + e\right )} + 1\right ) - c f - d \log \left (e^{\left (f x + e\right )} + 1\right )\right )}}{a f^{2} e^{\left (f x + e\right )} + a f^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.90, size = 53, normalized size = 1.08 \begin {gather*} \frac {2\,d\,x}{a\,f}-\frac {2\,\left (c+d\,x\right )}{a\,f\,\left ({\mathrm {e}}^{e+f\,x}+1\right )}-\frac {2\,d\,\ln \left ({\mathrm {e}}^{f\,x}\,{\mathrm {e}}^e+1\right )}{a\,f^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________